<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head th:replace="header :: common_header(~{::title},~{::link})">
    <title>秒到2.0商户管理后台-员工管理</title>
    <link th:href="@{/assets/pages/css/role.css}" rel="stylesheet" type="text/css" />
</head>

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <div class="page-wrapper">
        <div class="page-header navbar navbar-fixed-top" th:insert="~{index :: navbar-top}">
        </div>
        <div class="clearfix"> </div>
        <div class="page-container">
            <div class="page-sidebar-wrapper" th:insert="~{index :: sidebar}">
            </div>
            <div class="page-content-wrapper">
                <div class="page-content">
                    <!--<div class="page-bar">
                        <ul class="page-breadcrumb">
                            <li>
                                <a href="#">首页</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <a href="#">系统管理</a>
                                <i class="fa fa-circle"></i>
                            </li>
                            <li>
                                <span>员工管理</span>
                            </li>
                        </ul>
                    </div>-->
                    <!-- <h1 class="page-title"> 店员管理</h1> -->
                    <div class="row">
                        <div class="col-md-12">
                            <div class="portlet light bordered">
                                <div class="portlet-title">
                                    <div class="caption font-dark">
                                        <i class="icon-settings font-dark"></i>
                                        <span class="caption-subject bold uppercase"> 店员管理表</span>
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <div class="table-toolbar">
                                        <div class="row">
                                            <div class="col-md-6"></div>
                                            <div class="col-md-6">
                                                <div class="btn-group pull-right">
                                                    <button id="btn_new_role" class="btn sbold green"> 添加店员
                                                        <i class="fa fa-plus"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <table class="table table-striped table-bordered table-hover table-checkable order-column" id="table_role">
                                        <thead>
                                            <tr>
                                               <!--  <th>
                                                    <label class="mt-checkbox mt-checkbox-single mt-checkbox-outline">
                                                        <input type="checkbox" class="group-checkable" data-set="#role_table .checkboxes" />
                                                        <span></span>
                                                    </label>
                                                </th> -->
                                                <th> 姓名 </th>
                                                  <th> 手机 </th>
                                                  <th> 用户编号 </th>
                                                  <th> 用户角色 </th>
                                                <th> 创建时间 </th>
                                                <th> 操作 </th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 弹框 -->
            <!-- 新增 -->
            <div class="modal fade" id="modal_new_role" data-backdrop="static" data-keyboard="false">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                            </button>
                            <h4 class="modal-title">新建店员</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-horizontal">
                              <div class="form-group">
                                     <div class="col-md-9 text-center" >
                                        <span class="help-block" style="color:red"></span> 
                                        </div>
                                  	</div>                             
                                
                                <div class="form-group">
                                    <lable class="col-md-3 control-label">姓名：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="20" name="input_name" placeholder="请填写店员姓名">
                                   </div>
                                </div>
                                
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">密码：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="20" name="input_password" placeholder="请填写密码">
                                   </div>
                                </div>
                                
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">手机：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="11" name="input_phone" placeholder="请填写电话">
                                   </div>
                                </div>
                                
                                
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">用户编号：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="20" name="input_loginName" placeholder="请填写用户编号">
                                   </div>
                                </div>
                                
                                
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">角色：</lable>
                                    <div class="col-md-9">
                                        <select id="jiaose"  class="form-control input-medium" name="input_roleId" onchange="changeRole()" >
                                             <option th:each=" role : ${roles}"  th:text="${role.name}"  th:value="${role.id}">
                                             </option>
                                        </select>
                                         <div id="checkbox_new" th:if="${not #lists.isEmpty(mList)}" style="width: 100%;height: auto;overflow: hidden;">
                                        <div  class="checkbox-inline" th:each="m:${mList}" style="margin:0 10px;padding:0;overflow: hidden;width: 120px;">
                                            <label>
                                                <input type="checkbox" onclick="return false;"  name="relaIds" th:value="${m.id}" style='position: relative !important; padding: 0;margin: 0;'>
                                            <span>[[${m.name}]]</span>
                                            </label>                                            
                                        </div>
                                    </div>
                                   </div>
                                </div>
                                
                                
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn green" id="modal_sure_new">确定</button>
                            <button type="button" class="btn dark btn-outline" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 修改 -->
            <div class="modal fade" id="modal_edit_role" data-backdrop="static" data-keyboard="false">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal">
                            </button>
                            <h4 class="modal-title">修改店员</h4>
                        </div>
                        <div class="modal-body">
                            <div class="form-horizontal">
                                  <div class="form-group">
                                     <div class="col-md-9 text-center">
                                       <input type="hidden">
                                        <span class="help-block" style="color:red"></span> 
                                        </div>
                                  	</div>                             
                                
                                <div class="form-group">
                                    <lable class="col-md-3 control-label">姓名：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="20" name="input_name" placeholder="请填写店员姓名">
                                   </div>
                                </div>
                                
                              <!--                                   <div class="form-group">
                                    <lable class="col-md-3 control-label">密码：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" name="input_password" placeholder="请填写密码">
                                   </div>
                                </div>
                                 -->
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">手机：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" maxlength="11" name="input_phone" placeholder="请填写电话">
                                   </div>
                                </div>
                                
                                
                                  <!--                               <div class="form-group">
                                    <lable class="col-md-3 control-label">用户编号：</lable>
                                    <div class="col-md-9">
                                        <input type="text" class="form-control input-medium" name="input_loginName" placeholder="请填写用户编号">
                                   </div>
                                </div>
                                 -->
                                
                                                                <div class="form-group">
                                    <lable class="col-md-3 control-label">角色：</lable>
                                    <div class="col-md-9">
                                         <select id="jiaose"  class="form-control input-medium" name="input_roleId" onchange="changeRole()" >
                                             <option th:each=" role : ${roles}"  th:text="${role.name}"  th:value="${role.id}">
                                             </option>
                                        </select>
                                   </div>
                                </div>
                                
                                
                                
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn green" id="modal_sure_edit">确定</button>
                            <button type="button" class="btn dark btn-outline" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="page-footer">
            <div class="page-footer-inner"> 2017 &copy; 秒迅科技</a>
            </div>
            <div class="scroll-to-top">
                <i class="icon-arrow-up"></i>
            </div>
        </div>
    </div>
    <!-- 业务js -->
    <!-- <script th:src="@{/assets/global/plugins/jquery.min.js}" type="text/javascript"></script> -->
    <script th:src="@{/assets/pages/scripts/operator.js}" type="text/javascript"></script>
    
    <script type="text/javascript">
 /*    $(function() {
    	toget();
    });
  //切换权限角色
	function changeRole(){
		toget();
	}
	//异步获取权限
	function toget(){
		var _id=$("#jiaose").val();
		$.ajax({
			url:"/a/sys/operatorajax?id="+_id,
			type:"GET",
			dataType:"json",
		    success:function(data){
		    },
		    error:function(XMLHttpRequest, textStatus, errorThrown){
		    	alert(XMLHttpRequest.status);
			    alert(XMLHttpRequest.readyState);
			    alert(textStatus);
		      }
		});
	}  */
    </script>
</body>

</html>